Integrand size = 23, antiderivative size = 140 \[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\frac {b (d \cos (e+f x))^m \operatorname {Hypergeometric2F1}\left (1,-\frac {m}{2},1-\frac {m}{2},\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right ) f m}+\frac {\operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2+m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f} \]
[Out]
Time = 0.29 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3596, 3593, 771, 440, 455, 70} \[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\frac {\tan (e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {m+2}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a f}+\frac {b (d \cos (e+f x))^m \operatorname {Hypergeometric2F1}\left (1,-\frac {m}{2},1-\frac {m}{2},\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{f m \left (a^2+b^2\right )} \]
[In]
[Out]
Rule 70
Rule 440
Rule 455
Rule 771
Rule 3593
Rule 3596
Rubi steps \begin{align*} \text {integral}& = \left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int \frac {(d \sec (e+f x))^{-m}}{a+b \tan (e+f x)} \, dx \\ & = \frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a+x} \, dx,x,b \tan (e+f x)\right )}{b f} \\ & = \frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \left (\frac {a \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a^2-x^2}+\frac {x \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x^2}\right ) \, dx,x,b \tan (e+f x)\right )}{b f} \\ & = \frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {x \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x^2} \, dx,x,b \tan (e+f x)\right )}{b f}+\frac {\left (a (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a^2-x^2} \, dx,x,b \tan (e+f x)\right )}{b f} \\ & = \frac {\operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2+m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f}+\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x} \, dx,x,b^2 \tan ^2(e+f x)\right )}{2 b f} \\ & = \frac {b (d \cos (e+f x))^m \operatorname {Hypergeometric2F1}\left (1,-\frac {m}{2},1-\frac {m}{2},\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right ) f m}+\frac {\operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2+m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 14.21 (sec) , antiderivative size = 1132, normalized size of antiderivative = 8.09 \[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\frac {(d \cos (e+f x))^m \left (b \left (-1+\sec ^2(e+f x)^{-m/2}\right )+a m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {m}{2},\frac {3}{2},-\tan ^2(e+f x)\right ) \tan (e+f x)-b \operatorname {AppellF1}\left (m,\frac {m}{2},\frac {m}{2},1+m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2}\right )}{f (a+b \tan (e+f x)) \left (a m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {m}{2},\frac {3}{2},-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-b m \sec ^2(e+f x)^{-m/2} \tan (e+f x)+b m \operatorname {AppellF1}\left (m,\frac {m}{2},\frac {m}{2},1+m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \tan (e+f x) \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2}-b \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (-\frac {(a-i b) b m^2 \operatorname {AppellF1}\left (1+m,1+\frac {m}{2},\frac {m}{2},2+m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1+m) (a+b \tan (e+f x))^2}-\frac {(a+i b) b m^2 \operatorname {AppellF1}\left (1+m,\frac {m}{2},1+\frac {m}{2},2+m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1+m) (a+b \tan (e+f x))^2}\right )-\frac {1}{2} b m \operatorname {AppellF1}\left (m,\frac {m}{2},\frac {m}{2},1+m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1+\frac {m}{2}} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (-\frac {b^2 \sec ^2(e+f x) (-i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )-\frac {1}{2} b m \operatorname {AppellF1}\left (m,\frac {m}{2},\frac {m}{2},1+m,\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1+\frac {m}{2}} \left (-\frac {b^2 \sec ^2(e+f x) (i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )+a m \sec ^2(e+f x) \left (-\operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {m}{2},\frac {3}{2},-\tan ^2(e+f x)\right )+\left (1+\tan ^2(e+f x)\right )^{-1-\frac {m}{2}}\right )\right )} \]
[In]
[Out]
\[\int \frac {\left (d \cos \left (f x +e \right )\right )^{m}}{a +b \tan \left (f x +e \right )}d x\]
[In]
[Out]
\[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{m}}{b \tan \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int \frac {\left (d \cos {\left (e + f x \right )}\right )^{m}}{a + b \tan {\left (e + f x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{m}}{b \tan \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{m}}{b \tan \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx=\int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^m}{a+b\,\mathrm {tan}\left (e+f\,x\right )} \,d x \]
[In]
[Out]